package com.xx.controller;

import com.xx.domain.Product;
import com.xx.service.AddProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author : 徐闯 ssm_admin
 * @Date : 2021-05-12 18:05:01
 * @Description : add product
 **/
@Controller
public class AddProductController {
    @Autowired
    private AddProductService addProductService;
    @RequestMapping(value = "/addPro")
    @ResponseBody
    public int addPro(Product product){
        System.out.println(product);
        return addProductService.addProduct(product);
    }
}
